import service from './service'

let http = (url:any, method = 'GET', data = {}, params = {}) => {
    return new Promise((resolve, reject) => {
        service.request({
            url, method, data, params
        }).then((res:any) => {
            resolve(res)
        }).catch((err:any) => {
            reject(err)
        })
    })
}
export default http